package cn.com.websocket.mapper;

import cn.com.websocket.po.Message;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/***
 ** @category 请用一句话描述这个类的用途
 ** @author qing.yunhui
 ** @email: qingyh@glodon.com
 ** @createTime: 2021-08-12 9:50
 **/
public interface MessageMapper {

    int saveMessage(Message message);

    int updateMessageReadById(String id);

    int updateMessageReadByTarget(@Param("source") String source,@Param("target") String target,@Param("id") String id);

    /***
     * <p>获取双方的记录</p>
     */
    List<Message> getHistoryRecordBySourceWithTarget(@Param("source") String source,@Param("target") String target);


}
